package com.lucas.packdenp.controller;

import com.lucas.packdenp.mapper.ArtifactMapper;
import com.lucas.packdenp.pojo.entity.Artifact;
import com.lucas.packdenp.pojo.entity.ArtifactVo;
import com.lucas.packdenp.service.ArtifactService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("art")
public class ArtfactController {

    @Resource
    private ArtifactService artifactService;

    @RequestMapping("test")
    public String test(){
        return "test";
    }

    @PostMapping("add")
    public int addArt(@RequestBody Artifact artifact){
        return artifactService.addArt(artifact);
    }

    @PostMapping("del")
    public int delArt(@RequestBody Artifact artifact){
        return artifactService.delArt(artifact);
    }

    @PostMapping("addDep")
    public int addArt(@RequestBody ArtifactVo vo){
        return artifactService.addDep(vo);
    }






}
